import Immutable from 'immutable';
import _ from 'lodash'

const defaultState = new Immutable.List();

export default function billReducer(state = defaultState, action) {
  switch(action.type) {
    case 'LOAD_BILL_DATA':
      var data = action.data;
      if (data.success) {
        return data;
      }else {
        return [];
      }
    case 'ERROR_BILL':
      return action.error.status;
    default:
      return state;
  }
}
